package com.hist.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hist.dao.AdministratorDao;
import com.hist.entity.AddressCheck;
import com.hist.entity.AgeCheck;
import com.hist.entity.AllScore;
import com.hist.entity.Percent;
import com.hist.entity.SpolCheck;
import com.hist.entity.Student;
import com.hist.service.AdministratorService;
import org.springframework.jdbc.core.JdbcTemplate;
@Service
public class AdministratorServiceImpl implements AdministratorService{

	  @Autowired
	  AdministratorDao dao;
	  /*修改学生信息*/
	  public void updateStudent(Integer sno,String sname,String ssex,Integer sage,String sdept,String smajor,Integer sgrade,Integer school_length,String saddress,String spol,String snation,String srp,String smove)
	  {
		  dao.updateStudent(sno,sname,ssex,sage,sdept,smajor,sgrade,school_length,saddress,spol,snation,srp,smove);
	  }
	  @Override
		public List<Student> getStudent(Integer sno) {
			// TODO Auto-generated method stub
			return dao.getStudent(sno);
		}

	  //*查看全体学生信息*/
	  public List<Student> allstudent()
      {
  	    return dao.allstudent();
      }
	  /*按年龄统计学生人数*/
	  public List<AgeCheck> ageCheck()
	  {
		  return dao.ageCheck();
	  }
	  /*按地区统计学生人数*/
	  public List<AddressCheck> addressCheck()
	  {
		  return dao.addressCheck();
	  }
	  /*按政治面貌统计学生人数*/
	   public List<SpolCheck> spolCheck()
	  {
		  return dao.spolCheck();
	  }
	  /*查看全体学生成绩*/
	  public List<AllScore> allScore()
	  {
		  return dao.allScore();
	  }
	  /*按专业分类，年级为单位查看学生成绩*/
	  public List<AllScore> checkScore(String smajor,Integer sgrade)
	  {
		  return dao.checkScore(smajor,sgrade);
	  }
	  /*修改学生成绩*/
	  public void updateScore(Double score,Integer sno)
	  {
		  dao.updateScore(score,sno);
	  }
	  @Override
		public List<AllScore> getScore(Integer sno) {
			// TODO Auto-generated method stub
			return dao.getScore(sno);
		}
		  
      /*查看学生各分数段成绩及其人数*/
	@Override
	public List<Percent> getpercent(String smajor, Integer sgrade) {
		// TODO Auto-generated method stub
		return dao.getpercent(smajor, sgrade);
	}
     
	
	
	  
	  
}
